package org.zxp.designpattern.singleton;

/**
 * @program: effectiveJava
 * @description: 懒汉 静态内部类
 * @author: X-Pacific zhang
 * @create: 2019-08-21 21:35
 **/
public class Singleton5 {
    private static class SingletonHolder{
        private static final Singleton5 INSTANCE = new Singleton5();
    }

    private Singleton5(){}

    public static Singleton5 getInstance(){
        return SingletonHolder.INSTANCE;
    }
}
